/**
 * OralceSerialNoDao.java
 * com.sitech.dao.oracle
 * Function： TODO 
 *
 *   ver  author   date    
 * ──────────────────────────────────
 *   	 geutopia  Jan 14, 2011        
 *
 * Copyright (c) 2011, TNT All Rights Reserved.
*/

package com.sitech.dao.oracle;

import java.util.HashMap;
import java.util.Map;

import com.sitech.dao.BaseDao;
import com.sitech.dao.SerialNoDao;

/**
 * ClassName:OralceSerialNoDao
 * Function: TODO ADD FUNCTION
 * Reason:	 TODO ADD REASON
 *
 * @author   geutopia
 * @version  
 * @since    Ver 1.1
 * @Date	 2011	Jan 14, 2011		1:27:05 PM
 *
 * @see 	 
 */

public class OralceSerialNoDao extends BaseDao implements SerialNoDao
{

	/**
	 * (non-Javadoc)
	 * @see com.sitech.dao.SerialNoDao#newSerialNo(java.lang.String)
	 */
	public String newSerialNo(String value)
	{
		
		return (String) querySingle("querySerialNoBySeq",value);
	}

	/**
	 * (non-Javadoc)
	 * @see com.sitech.dao.SerialNoDao#newDefaultSerialNo()
	 */
	public String newDefaultSerialNo()
	{
		return (String) querySingle("defaultSeq");
	}

	public String crateFormatCode(String tableName, String column, String parentCode, int codeStep)
	{
		Map map = new HashMap<String, String>();
		
		map.put("tableName", tableName);
		map.put("column", column);
		map.put("parentCode", parentCode);
		map.put("codeStep", codeStep);
		
		return (String) querySingle("crateFormatCode", map);		
	}
	
}
